﻿using System;
using System.IO;
using System.Web;

namespace SSP.Api.Cache
{
    /// <summary>
    /// 
    /// </summary>
    public class CacheControl
    {
        /// <summary>
        /// 
        /// </summary>
        public static string __FILE__ = "__file__";
        /// <summary>
        /// 
        /// </summary>
        public System.Collections.Hashtable names;
        /// <summary>
        /// 
        /// </summary>
        public string to_clear;

        /// <summary>
        /// Clears this instance.
        /// </summary>
        public void Clear()
        {
            ////CONVERSION_WARNING: Method 'explode' was converted to 'System.String.Split' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\Program Files\Microsoft Corporation\PHP to ASP.NET Migration Assistant\PHPToAspNet.chm::/explode.htm 
            //names = new OrderedMap(HttpContext.Current.Request.QueryString["name"].Split(",".ToCharArray()));
            //foreach (object namex in names.Values)
            //{
            //    //CONVERSION_WARNING: Method 'str_replace' was converted to 'PHP.StringSupport.StringReplace' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\Program Files\Microsoft Corporation\PHP to ASP.NET Migration Assistant\PHPToAspNet.chm::/str_replace.htm 
            //    string name = StringSupport.StringReplace(StringSupport.StringReplace(namex.ToString(), ".", ""), "/", Convert.ToString(Path.DirectorySeparatorChar));
            //    to_clear = Path.GetDirectoryName(__FILE__) + Convert.ToString(Path.DirectorySeparatorChar) + TypeSupport.ToString(name);
            //    if (File.Exists(to_clear) || Directory.Exists(to_clear))
            //    {
            //        //CONVERSION_WARNING: Method 'unlink' was converted to 'System.IO.File.Delete' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\Program Files\Microsoft Corporation\PHP to ASP.NET Migration Assistant\PHPToAspNet.chm::/unlink.htm 
            //        File.Delete(to_clear);
            //    }
            //}
        }
    }
}